home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 November / MACPOWER-1997-11.ISO.7z / MACPOWER-1997-11.ISO / Apple関連 / ResEdit 2.1.3 / Examples / PExamples / Source / ResEd.p < prev    next >
Text File  |  1994-09-14  |  19KB  |  483 lines

  1. {
  2.  COPYRIGHT (C) 1984-1990 Apple Computer,Inc.
  3.  All rights reserved
  4.  
  5.     Resource editor interface unit for instances of editors and pickers. This should be
  6.     USE'd by any pascal implementation of a resource editor or picker.  The
  7.     companion file ResDisp.a.o should be linked with the pascal to build
  8.     the file for inclusion in ResEdit.
  9.     
  10.     Pickers are given a resource type and should display all of that type in 
  11.     the current resfile in a suitable format.     If the picker is given an open call 
  12.     AND there's a compatible editor, it should give birth to the Editor.  The editor
  13.     is given a handle to the resource object and it should open up an edit
  14.     window for the user.
  15.  
  16.  }
  17.  
  18.  
  19. UNIT ResEd;
  20.  
  21.  
  22. INTERFACE
  23.  
  24. Uses    Memtypes, QuickDraw, OSIntf, ToolIntf, Printing;
  25.  
  26.  
  27. CONST
  28.  
  29.     { Standard menus exported by ResEdit }
  30.  
  31.     fileMenu    = 2;
  32.  
  33.     newFileItem     = 1;
  34.     openFileItem    = 2;
  35.     openSpecialItem = 3;
  36.     closeItem       = 4;
  37.     saveItem         = 5;
  38.     revertItem        = 6;
  39.     getThisInfoItem = 8;
  40.     getInfoItem     = 9;
  41.     verifyItem        = 10;
  42.     pageSetupItem    = 12;
  43.     printItem        = 13;
  44.     preferencesItem = 15;
  45.     quitItem        = 17;
  46.     
  47.     { Masks for AbleMenu - normally not used directly. }
  48.     newFileMask        = $2;
  49.     openFileMask    = $4;
  50.     openSpecialMask    = $8;
  51.     closeMask        = $10;
  52.     saveMask        = $20;
  53.     revertMask        = $40;
  54.     getThisInfoMask = $100;
  55.     getInfoMask        = $200;
  56.     verifyMask        = $400;
  57.     pageSetupMask    = $1000;
  58.     printMask        = $2000;
  59.     preferencesMask = $08000;
  60.     quitMask        = $020000;
  61.     disabledMask    = $1;
  62.     
  63.     { Mask combinations to be used in calls to AbleMenu. }
  64.     fileNotOpen            = disabledMask + newFileMask + openFileMask + openSpecialMask + getInfoMask + 
  65.                             verifyMask + pageSetupMask + preferencesMask + quitMask;
  66.     fileNoPrint         = fileNotOpen + getThisInfoMask + closeMask + saveMask + revertMask;
  67.     fileAll                = fileNoPrint + printMask;
  68.     fileNoSaveOrRevert     = fileNotOpen + getThisInfoMask + closeMask + printMask;
  69.     fileDA                = disabledMask + openFileMask + newFileMask + openSpecialMask + 
  70.                           getInfoMask + verifyMask + closeMask + quitMask;
  71.  
  72.     rsrcMenu    = 128;
  73.     
  74.     rsrcCreateItem        = 1;
  75.     rsrcOpenItem        = 2;
  76.     rsrcOpenTemplateItem= 3;
  77.     rsrcOpenHexItem        = 4;
  78.     rsrcRevertItem        = 6;
  79.     rsrcGetInfoItem        = 8;
  80.     
  81.     rsrcCreateMask        = $2;
  82.     rsrcOpenMask        = $4;
  83.     rsrcOpenTemplateMask= $8;
  84.     rsrcOpenHexMask        = $10;
  85.     rsrcRevertMask        = $40;
  86.     rsrcGetInfoMask        = $100;
  87.     rsrcDisabledMask    = $FFFFFE01;
  88.     
  89.     rsrcDisabled        = $FFFFFE00;
  90.     rsrcRevertOnly        = rsrcDisabledMask + rsrcRevertMask;
  91.     rsrcPickerNoSel        = rsrcDisabledMask + rsrcCreateMask;
  92.     rsrcFilePicker        = rsrcPickerNoSel + rsrcOpenHexMask + rsrcRevertMask + rsrcOpenMask;
  93.     rsrcRsrcPicker        = rsrcFilePicker + rsrcOpenTemplateMask + rsrcGetInfoMask;
  94.     rsrcEditor            = rsrcDisabledMask + rsrcRevertMask + rsrcGetInfoMask;
  95.     rsrcEditorPicker    = rsrcEditor + rsrcOpenMask + rsrcOpenTemplateMask + rsrcOpenHexMask;
  96.     rsrcDITLEd            = rsrcEditorPicker - rsrcOpenHexMask + rsrcCreateMask;
  97.     rsrcEditorCreate    = rsrcEditor + rsrcCreateMask;
  98.     
  99.     editMenu        = 3;
  100.  
  101.     undoItem            = 1;
  102.     cutItem             = 3;
  103.     copyItem            = 4;
  104.     pasteItem           = 5;
  105.     clearItem           = 6;
  106.     dupItem             = 8;
  107.     selectAllItem        = 9;
  108.     selectChangedItem    =10;
  109.     
  110.     { Masks for AbleMenu - normally not used directly. }
  111.     undoMask        = $2;
  112.     cutMask            = $8;
  113.     editCopyMask    = $10;
  114.     pasteMask        = $20;
  115.     clearMask        = $40;
  116.     duplicateMask    = $100;
  117.     selectAllMask    = $200;
  118.     selectChangedMask=$400;
  119.     editDisabledMask= $FFFFF801;
  120.  
  121.     { Mask combinations to be used in calls to AbleMenu. }
  122.     editNone    = editDisabledMask - 1;
  123.     editClear    = editDisabledMask + clearMask;
  124.     editCopy    = editDisabledMask + editCopyMask;
  125.     editPaste    = editDisabledMask + pasteMask;
  126.     editUndoPasteOnly = editPaste + undoMask;
  127.     editDup        = editClear + duplicateMask;
  128.     editNoDup    = editDisabledMask + cutMask + editCopyMask + pasteMask + clearMask; { No dup or undo }
  129.     editNoUndo    = editNoDup + duplicateMask;
  130.     editUndNoDup= editNoDup + undoMask;
  131.     editAll        = editNoUndo + undoMask;
  132.     editAcc     = editUndNoDup;            { for DAs }
  133.     
  134.     viewMenu = 130;                        { Type pickers view menu. }
  135.     
  136.     viewByIDItem            = 1;
  137.     viewByNameItem            = 2;
  138.     viewBySizeItem            = 3;
  139.     viewByOrderItem            = 4;
  140.     viewBySpecialItem        = 5;
  141.     viewShowAttributesItem    = 7;
  142.     
  143.     { Masks for AbleMenu. }
  144.     viewByIDMask            = $2;
  145.     viewByNameMask            = $4;
  146.     viewBySizeMask            = $8;
  147.     viewByOrderMask            = $10;
  148.     viewBySpecialMask        = $20;
  149.     viewShowAttributesMask    = $80;
  150.     viewDisabledMask        = $FFFFFF01;
  151.     
  152.     viewNoSpecial            = viewDisabledMask + viewByIDMask + viewByNameMask + viewBySizeMask + viewByOrderMask + viewShowAttributesMask;
  153.     viewNoAttributes        = viewDisabledMask + viewByIDMask + viewByNameMask + viewBySizeMask + viewByOrderMask + viewBySpecialMask;
  154.     viewAll                    = viewNoAttributes + viewShowAttributesMask;
  155.  
  156.     fontMenu            = 144;        { Font menu with menus already added. }
  157.     
  158.     miscStrings            = 129;        { Resource ID of STR# resource containing the strings. }
  159.     miscStringsName        = 'Misc';    { Accessing resources by name is preferred }
  160.     cantLoadSndErrStr    = 24;        { Snd picker string. }
  161.     sysStr                 = 45;        { 'Sys', etc. used by LDEF. }
  162.  
  163.     { Text for selected errors }
  164.     errorStrings        = 132;        { Resource ID of STR# resource containing the error strings }
  165.     errorStringsName    = 'Errors';    { Accessing resources by name is preferred }
  166.     genericErrStr            = 1;    { Returned by GetErrorText when no specific message available }
  167.     ioErrStr                = 1;
  168.     writeProtectErrStr        = 2;
  169.     diskFullErrStr            = 3;
  170.     fileLockedErrStr        = 4;
  171.     outOfMemoryErrStr        = 5;
  172.     alreadyOpenErrStr        = 6;
  173.     tooManyOpenErrStr        = 7;
  174.     volNotMountedErrStr        = 8;
  175.     resNotFoundErrStr        = 9;
  176.     accessErrStr            = 10;
  177.     resFileNotFoundErrStr    = 11;
  178.     addResFailErrStr        = 12;
  179.     removeResFailErrStr        = 13;
  180.     resAttributesErrStr        = 14;
  181.     resMapErrStr            = 15;    
  182.     fileNotFoundErrStr        = 16;
  183.     eofErrStr                = 17;
  184.     fileBusyStr                = 18;
  185.     cantDecompressStr        = 19;
  186.  
  187.     arrowCursor         = -1;        { Used in the call to SetTheCursor to set the arrow cursor. }
  188.     
  189.     theScrollBar        = 15;        { Width of a scroll bar. }
  190.     
  191.     okChoice = 1;                    { Used for the OK button in dialogs. }
  192.     
  193.     noDialog = 0;                    { Used with EditorWindSetup. }
  194.     noScrap = -1;                    { Used with GetResEditScrapFile. }
  195.     
  196.     alertStringsName = 'Alert strings';
  197.     revertResourceAlertStr = 1;
  198.     noTemplateAlert = 2;            { GNRL editor }
  199.     cantPlayOnThisMachineAlert = 3;    { snd picker }
  200.     cantPlaySndAlert = 4;            { snd picker }
  201.  
  202.     { Consts for Resource menu string }
  203.     rsrcStrName = 'Resource menu';
  204.     rsrcCreateStr = 1;
  205.     rsrcOpenStr = 2;
  206.     rsrcListStr = 3;
  207.     rsrcOpenLists = 4;
  208.     rsrcOpenEditor = 5;
  209.     rsrcOpenEditors = 6;
  210.     rsrcOpenHex = 7;
  211.     rsrcRevert = 8;
  212.     rsrcRevertThese = 9;
  213.     rsrcResources = 10;
  214.     rsrcRevertRes = 11;
  215.     rsrcRevertThis = 12;
  216.     rsrcPatCreateStr = 13;
  217.     rsrcSICNCreateStr = 14;
  218.     rsrcDITLCreateStr = 15;
  219.     rsrcRevertItemStr = 16;
  220.     rsrcGNRLCreateStr = 17;
  221.     rsrcOpenTemplate = 18;
  222.     rsrcOpenPickerByID = 19;
  223.     
  224.     { Character code constants }
  225.      leftArrowKey     = $1c;
  226.      rightArrowKey     = $1d;
  227.      upArrowKey         = $1e;
  228.      downArrowKey     = $1f;
  229.      tabkey             = $09;
  230.     enterKey         = $03;
  231.     deleteKey         = $08;
  232.     returnKey         = $0d;
  233.     escapeKey         = $1b;
  234.     periodKey         = $2e;
  235.  
  236. TYPE
  237.     STR64 = STRING[64];
  238.  
  239.     { Alert kinds used by the DisplayAlert procedure. }
  240.     AlertType = (displayTheAlert, displayStopAlert, displayNoteAlert, displayCautionAlert, 
  241.                  displayYNAlert, displayYNCAlert, displayYNCStopAlert, displayCancelDefaultCautionAlert);
  242.  
  243.     { Icon kinds used by the ChooseIcon function }
  244.     IconType = (  noIcon, normalIcon, reducedIcon, smallIcon, onlyICON, onlyICNPound  );
  245.      {     This defines the various types of icons handled by the icon chooser package. 
  246.          Passing onlyICON in the IconKind parameter of the ChooseIcon function forces the 
  247.         IconChooser to not allow reduced ICONs and SICNs. Passing onlyICNPound in 
  248.         the IconKind parameter uses ICN# resources instead of ICONs. Passing any
  249.          other value instructs the IconChooser to support regular ICONs, reduced ICONs, 
  250.         and SICNs (like in the MENU editor).               }
  251.     
  252.     { Kinds of windows that support color in different degrees }
  253.     ColorType = ( noColor, canColor, requiresColor );
  254.  
  255.     { This structure is used by the GetQuickDrawVars procedure. }
  256.     pQuickDrawVars = ^QuickDrawVars;
  257.     QuickDrawVArs = RECORD
  258.         randSeed:     LONGINT;
  259.         screenBits: BitMap;
  260.         arrow:         Cursor;
  261.         dkGray:     Pattern;
  262.         ltGray:     Pattern;
  263.         gray:         Pattern;
  264.         black:         Pattern;
  265.         white:         Pattern;
  266.         thePort:     GrafPtr;
  267.     END; { QuickDrawVars }
  268.  
  269.     PickerType = (textOnlyPicker, graphical1DPicker, graphical2DPicker);
  270.  
  271.     PossibleWindowTypes = (typePickerWindow, resourcePickerWindow, 
  272.                            folderInfoWindow, fileInfoWindow, resourceInfoWindow,
  273.                            editorWindow, floatingWindow);
  274.     ParentPtr = ^ParentRec;
  275.     ParentHandle = ^ParentPtr;
  276.  
  277.     ParentRec = RECORD
  278.         father:         ParentHandle;
  279.         name:             str255;
  280.         wind:             WindowPeek;        { Window that this record belongs to. }
  281.         rebuild:         BOOLEAN;        { Flag set to indicate that window should be rebuilt }
  282.         resWasntLoaded: BOOLEAN;        { TRUE if the resource should be released when the window is closed. }
  283.         windowType:     PossibleWindowTypes;
  284.         theResType:     ResType;        { Type of the resource being picked or edited. }
  285.         theResFile:        INTEGER;        { The home resfile of the window. }
  286.         codeResID:        INTEGER;        { Resource ID of the RSSC resource containing the picker or editor. }
  287.         theResToEdit:    Handle;
  288.     END;
  289.  
  290.     { Standard picker record }
  291.  
  292.     PickPtr = ^PickRec;
  293.     PickHandle = ^PickPtr;
  294.  
  295.     ViewTypes = (viewById, viewByName, viewBySize, viewByOrder, viewBySpecial);
  296.     PickRec = RECORD
  297.         father:         ParentHandle;    { Back ptr to dad }
  298.         fName:             STR255;
  299.         wind:             WindowPtr;        { Picker window }
  300.         rebuild:         BOOLEAN;
  301.         spare1:         BOOLEAN;        { Not used here}
  302.         windowType:     PossibleWindowTypes;
  303.         theResType:     ResType;        { Type of the resource being picked or edited. }
  304.         theResFile:        INTEGER;        { The home resfile of the window. }
  305.         codeResID:         INTEGER;        { Resource ID of the RSSC resource containing the picker or editor. }
  306.         spare:            Handle;            { Not used here}
  307.  
  308.         rType:             ResType;        { Type for picker - could be different from theResType }
  309.         rSize:             LONGINT;        { Size of a null resource }
  310.         minWindowWidth:    INTEGER;        { Used when the window is grown. }
  311.         minWindowHeight:INTEGER;
  312.         instances:        ListHandle;        { List of instances }
  313.         nInsts:         INTEGER;        { Number of instances }
  314.         viewBy:            ViewTypes;        { Current view type }
  315.         showAttributes: BOOLEAN;        { Show attrs in window?    }
  316.         ldefType:        ResType;        { Which LDEF to use }
  317.         theViewMenu:    MenuHandle;        { The picker view menu }
  318.         viewMenuMask:     LONGINT;        { Which items are enabled? }
  319.         cellSize:        Cell;            { Cell size for special view. }
  320.         optionCreateStr:STR255;            { Create item menu text when the option key is pressed. }
  321.     END;
  322.     
  323.     FloatingWindowPtr = ^FloatingWindowRec;
  324.     FloatingWindowHandle = ^FloatingWindowPtr;
  325.     FloatingWindowRec = RECORD
  326.         father:         ParentHandle;    { Back ptr to dad }
  327.         name:             STR255;
  328.         wind:             WindowPtr;        { Floating window. }
  329.         rebuild:         BOOLEAN;
  330.         visible:         BOOLEAN;        { Is the window to be hidden temporarily }
  331.         windowType:     PossibleWindowTypes;
  332.         theResType:     ResType;        { Type of the resource being picked or edited. }
  333.         theResFile:        INTEGER;        { The home resfile of the window. }
  334.         codeResID:         INTEGER;        { Resource ID of the RSSC resource containing the picker or editor. }
  335.         ownerWindow:    WindowPtr;        { Which window owns this floating window? }
  336.     END;        
  337.  
  338.  
  339. { Window Utilities }
  340.  
  341.     FUNCTION  AlreadyOpen (VAR windowTitle, windowName: STR255; father: ParentHandle): BOOLEAN;
  342.     FUNCTION  EditorWindSetup (dlogID: INTEGER; colorKind: ColorType; width, height: INTEGER; 
  343.                                VAR windowTitle, windowName: STR255; addFrom: BOOLEAN; 
  344.                                windowKind: INTEGER; father: ParentHandle): WindowPtr;
  345.     FUNCTION  FloatingWindowSetup (WINDID: INTEGER; fw: FloatingWindowHandle; 
  346.                                       owner: Parenthandle; where: Point): WindowPtr;
  347.     PROCEDURE GetWindowTitle (VAR windowTitle, windowName: STR255; addFrom: BOOLEAN; father: ParentHandle);
  348.     FUNCTION  PickerWindSetup(colorKind: ColorType; showTheWindow: BOOLEAN; width, height: INTEGER; VAR windowTitle: STR255;
  349.                               windowKind: INTEGER; dad: ParentHandle): WindowPtr;
  350.     PROCEDURE SetETitle (h: Handle; VAR str: STR255);
  351.     FUNCTION  WindAlloc: WindowPtr;
  352.     PROCEDURE WindReturn (w: WindowPtr);
  353.  
  354. { Extended Resource Manager. }
  355.  
  356.     FUNCTION  REAddNewRes(resFile: INTEGER; hNew: Handle; t: ResType; idNew: INTEGER; s: STR255): BOOLEAN;
  357.     PROCEDURE REAddResource(resFile: INTEGER; theResource: Handle;
  358.                             theType: ResType;theID: INTEGER; name: Str255);
  359.     FUNCTION  REBeautifulUnique1ID(resFile: INTEGER; WhichType: ResType): INTEGER;
  360.     FUNCTION  RECount1Resources(resFile: INTEGER; theType: ResType): INTEGER;
  361.     FUNCTION  RECount1Types (resFile: INTEGER): INTEGER;
  362.     FUNCTION  REGet1IndResource(resFile: INTEGER; theType: ResType;index: INTEGER): Handle;
  363.     PROCEDURE REGet1IndType(resFile: INTEGER; VAR theType: ResType;index: INTEGER);
  364.     FUNCTION  REGet1NamedResource(resFile: INTEGER; theType: ResType;name: Str255): Handle;
  365.     FUNCTION  REGet1Resource(resFile: INTEGER; theType: ResType;theID: INTEGER): Handle;
  366.     FUNCTION  REGet1ResourceSpecial (resFile: INTEGER; theType: ResType; ID: INTEGER; 
  367.                                      VAR wasLoaded: BOOLEAN; VAR error: INTEGER): Handle;
  368.     FUNCTION  RENewUniqueRes(resFile: INTEGER; s: LONGINT; t: ResType): Handle;
  369.     PROCEDURE RERemoveAnyResource (resFile: INTEGER; theRes: Handle);
  370.     FUNCTION  RevertThisResource (theObj: ParentHandle; res: Handle): BOOLEAN;
  371.  
  372. { Routines used by pickers. }
  373.  
  374.     FUNCTION  DefaultListCellSize:INTEGER;         
  375.     FUNCTION  DoPickBirth(colorKind: ColorType; buildList: BOOLEAN; which: PickerType; 
  376.                           pickerResId: INTEGER; pick: PickHandle): BOOLEAN;
  377.  
  378.     {    The drawProc is of the form: PROCEDURE DrawResource (lRect: Rect; theRes: Handle);        }
  379.     PROCEDURE DrawLDEF (message: INTEGER; lSelect: BOOLEAN; lRect: Rect; theRes: Handle;
  380.                         id: INTEGER; title: STR255; maxH, maxV: INTEGER;
  381.                         DrawResource: ProcPtr; lh: ListHandle);
  382.     PROCEDURE GrowMyWindow (minWidth, minHeight: INTEGER; windPtr: WindowPtr; lh: ListHandle);
  383.     PROCEDURE PickEvent (VAR evt: EventRecord; pick: PickHandle);
  384.     PROCEDURE PickInfoUp (oldID, newID: INTEGER; pick: PickHandle);
  385.     PROCEDURE PickMenu (menu, item: INTEGER; pick: PickHandle);
  386.     FUNCTION  PickStdHeight: INTEGER;
  387.     FUNCTION  PickStdWidth: INTEGER;
  388.     
  389. { Routines used by editors. }
  390.     FUNCTION  CloseNoSave: BOOLEAN; 
  391.     FUNCTION  NeedToRevert (myWindow: WindowPtr; theRes: Handle): BOOLEAN;
  392.     PROCEDURE NoDoubleClickHere;
  393.     PROCEDURE SetResChanged (h: Handle);
  394.     FUNCTION  WasItLoaded: BOOLEAN;
  395.  
  396. { Routines used to start pickers and editors. }
  397.  
  398.     PROCEDURE GiveEBirth (resHandle: Handle; pick: PickHandle);
  399.     PROCEDURE GiveSubEBirth (resHandle: Handle; pick: PickHandle);
  400.     PROCEDURE GiveThisEBirth (resHandle: Handle; pick: PickHandle; openThisType:ResType);
  401.  
  402. { Routines used to feed events and menus to the appropriate picker or editor. }
  403.  
  404.     PROCEDURE CallDoEvent (evt: EventRecord; theWindow: WindowPtr);
  405.     PROCEDURE CallInfoUpdate (oldID, newID: INTEGER; refcon: LONGINT; id: INTEGER );
  406.     PROCEDURE PassEvent (evt: EventRecord; father: ParentHandle);
  407.     PROCEDURE PassMenu (menu, item: INTEGER; father: ParentHandle);
  408.  
  409. { Miscellaneous utilities. }
  410.     
  411.     PROCEDURE Abort;
  412.     PROCEDURE AbleMenu(menu: INTEGER; enable: LONGINT);
  413.     PROCEDURE BubbleUp(h: Handle);
  414.     PROCEDURE CenterDialog(theType: ResType; dialog: INTEGER);
  415.     FUNCTION  CheckError(err, msgID: INTEGER): BOOLEAN;
  416.     FUNCTION  ChooseIcon( EdHandle: ParentHandle; VAR IconResID: integer;
  417.                           VAR IconKind: IconType; dialogID: integer): BOOLEAN;
  418.     FUNCTION  ColorAvailable(needColorQD: BOOLEAN): BOOLEAN;
  419.     PROCEDURE ConcatStr(VAR str1: STR255; str2: STR255);
  420.     FUNCTION  DisplayAlert(which: AlertType; id: INTEGER): INTEGER;
  421.     FUNCTION  DisplaySTRAlert(which: AlertType; STRName: STR255; STRIndex: INTEGER): BOOLEAN;
  422.     PROCEDURE DrawMBarLater(forceItNow: BOOLEAN);
  423.     FUNCTION  FindOwnerWindow(theRes: Handle): WindowPeek;
  424.     PROCEDURE FixHand(s: LONGINT; h: Handle);
  425.     PROCEDURE FlashDialogItem(dp: DialogPtr; item: integer);
  426.     PROCEDURE FrameDialogItem(dp: DialogPtr; item: integer);
  427.     PROCEDURE GetNamedStr(index: INTEGER; name: STR255; VAR str: STR255);
  428.     FUNCTION  GetQuickDrawVars: pQuickDrawVars;
  429.     FUNCTION  GetScreenRect(roomForIcons: BOOLEAN; wind: WindowPtr): Rect;
  430.     PROCEDURE GetStr(index, resID: INTEGER; VAR str: STR255);
  431.     FUNCTION  HandleCheck(h: Handle; msgID: INTEGER): BOOLEAN;
  432.     PROCEDURE MetaKeys(VAR cmd, shift, opt: BOOLEAN);
  433.     FUNCTION  PrintSetup: Handle;        { Return type is actually THPrint }
  434.     PROCEDURE PrintWindow(toPrint: PicHandle);
  435.     FUNCTION  ResEdID: INTEGER;
  436.     PROCEDURE SetTheCursor(whichCursor: INTEGER);
  437.     PROCEDURE ShowInfo(h:Handle; father: ParentHandle);
  438.     FUNCTION  StandardFilter(theDialog: DialogPtr; VAR theEvent: EventRecord;
  439.                                 VAR itemHit: INTEGER): BOOLEAN;
  440.     PROCEDURE TypeToString(t: ResType; VAR s: Str255);
  441.     PROCEDURE UseAppRes;
  442.     FUNCTION  WasAborted: BOOLEAN;
  443.     
  444. { Popup Menus }
  445.  
  446.     FUNCTION  ColorPalettePopupSelect(whichWindow: WindowPtr; itemBox: Rect;
  447.                 VAR whichColor: RGBColor; CQDishere: Boolean; useColorPicker: BOOLEAN ): Boolean;
  448.     PROCEDURE DeinstallColorPalettePopup(whichWindow: WindowPtr; CQDishere: Boolean );
  449.     PROCEDURE DoPopup( whichDialog: DialogPtr; promptDialogItem, popupDialogItem: integer;
  450.                        VAR menuItem: integer; whichMenu: MenuHandle);
  451.     PROCEDURE DrawColorPopup(whichWindow: WindowPtr; itemBox: Rect;
  452.                              whichColor: RGBColor; CQDishere: Boolean );
  453.     PROCEDURE DrawPopup( whichDialog: DialogPtr; whichDialogItem, whichMenuItem: integer;
  454.                          whichMenu: MenuHandle);
  455.     PROCEDURE InstallColorPalettePopup(whichWindow: WindowPtr; CQDishere, isActive: Boolean );
  456.     
  457. { Routines that are used internally within ResEdit and may be useful in other
  458.     circumstances. }
  459.  
  460.     FUNCTION  BuildType (t: ResType; l: ListHandle): INTEGER;
  461.     FUNCTION  CompressedResource(theResource: Handle): BOOLEAN;
  462.     PROCEDURE DoKeyScan (var evt: EventRecord; offset: integer; lh: ListHandle);
  463.     FUNCTION  DupPick (h: Handle; c: cell; pick: PickHandle): Handle;
  464.     PROCEDURE GetErrorText (error: INTEGER; VAR errorText: STR255);
  465.     FUNCTION  GetResEditScrapFile: INTEGER;
  466.     FUNCTION  GetType (templatesOnly: BOOLEAN; VAR s: STR255): BOOLEAN;
  467.     FUNCTION  MapResourceType (editor: BOOLEAN; theRes: Handle; origResType: ResType): ResType;
  468.     FUNCTION  PlaySyncSound(which: INTEGER; sndHandle: Handle): BOOLEAN;
  469.     FUNCTION  ResEditRes: INTEGER;
  470.         Inline    { move.w    CurApRefNum,(sp) } $3eB8, $0900;
  471.     PROCEDURE ResourceIDHasChanged (theObj: ParentHandle; theType: ResType; theOldId, theNewId: INTEGER);
  472.     FUNCTION  RestoreRemovedResources (pick: PickHandle): BOOLEAN;
  473.     PROCEDURE ScrapCopy (theType: ResType; VAR h: Handle);
  474.     PROCEDURE ScrapEmpty;
  475.     PROCEDURE SendRebuildToPicker (theType: ResType; parent: ParentHandle);
  476.     PROCEDURE SendRebuildToPickerAndFile (theType: ResType; parent: ParentHandle) ;
  477.     FUNCTION  SysResFile: INTEGER;
  478.     FUNCTION  WindList (w: WindowPtr; nAcross: INTEGER; cSize: Point; drawProc:INTEGER): ListHandle;
  479.     PROCEDURE WindOrigin (w: WindowPtr; dad: ParentHandle);
  480.     PROCEDURE WritePreferences (prefType: ResType; prefId: INTEGER; prefName: STR255; prefHandle: Handle);
  481.     
  482. END.
  483.